package com.company.demo.observer_pattern;

import com.company.demo.TestInterface;

public class ObserverTest implements TestInterface {
    @Override
    public void run() {
        System.out.println("观察者模式测试");
        Subject subject;
        subject = new ConcreteSubject();

        subject.addObserver(new ObserverMine());
        subject.addObserver(new ObserverVillager());

        subject.notifyObserver("鬼子");

    }
}
